package com.demo.gulimall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.gulimall.common.to.mq.SeckillOrderTo;
import com.demo.gulimall.order.entity.Order;
import com.demo.gulimall.order.vo.*;
import org.springframework.stereotype.Service;

import java.util.concurrent.ExecutionException;

/**
 * @author Chen Yuan
 */

@Service
public interface OrderService extends IService<Order> {


	OrderConfirmVo confirmOrder(Long userId) throws ExecutionException, InterruptedException;

	OrderSubmitResVo submitOrder(OrderSubmitVo orderSubmitVo);

	Order getOrderBySn(String orderSn);

	Boolean closeOrder(Order order);

	PayVo getOrderPay(String orderSn);

	String handlePayResult(PayAsyncVo asyncVo);

	void createSeckillOrder(SeckillOrderTo orderTo);
}
